Variable
The Variable class represents a workflow variable that can hold various types of data, including linked document values, and provides methods for manipulating and setting values from different sources, such as positions, professions, or documents.
Properties
Name | Description |
---|---|
LinkedObjectName | The name of the object within the linked document that the variable corresponds to. |
TextML | A dictionary representing multilingual text values for the variable, allowing for language-specific text retrieval. |
Key | A unique identifier for the workflow step. |
IsPublic | Specifies whether the variable is public, allowing access from other components or parts of the workflow. |
WorkflowCodeInstance | The workflow code instance associated with the flow object. |
CachedDMObjects | The cached document management objects related to the flow object. |
LinkedDocumentObjectName | The name of the linked document object that the variable is associated with, if any. |
TypeCode | The type code associated with the flow object. |
ValueType | The data type of the variable's value, such as integer, decimal, text, or date. |
IsLinked | Indicates whether the variable is linked to a document control, determining whether its value is sourced from a linked document object. |
ValueSourceType | The source type of the variable's value, which determines where the value is retrieved from (e.g., document, position, profession). |
Name | Name for the workflow step. |
Value | The value of the variable. It can be a simple data type or a complex object, depending on the variable's configuration and source. |
Text | The text representation of the variable, used for displaying purposes, especially when the variable is linked to a document control. |
IsHtml | Indicates whether the variable's value or text should be treated as HTML content. |
Caption | The caption dictionary representing localized captions for the flow object. |
Constructors
Name | Description |
---|---|
Variable(name, workflowData, workflowCodeInstance) | Constructor for the Variable class. Initializes a new instance of the Variable class. |
Variable(name, workflowData, workflowCodeInstance) | Constructor for the Variable class. Initializes a new instance of Variable with the specified name, workflow data, and optional workflow code instance. |
Methods
Name | Description |
---|---|
SetFromPosition(sourcePosition) | Sets the variable's value from a workflow position's ID and description. |
SetFromDepartment(sourceDepartment) | Sets the variable's value from a department's ID. |
Increment() | Increments the variable's value by 1, assuming the value is numeric. |
Initialize() | Initializes the variable. Can be used to set up default values or configurations for the variable before use. |
SetFromProjectName() | Sets the variable's value to the name of the current project in the workflow. |
SetConstantValue(value) | Sets the variable's value to a constant value, detaching it from any dynamic sources or links. |
UnlinkObject() | Removes the link between the variable and its associated document object, making it a regular variable with no document link. |
ToLiquid() | Converts the variable to a Liquid-compatible object, useful for rendering in templates or workflows. |
SetFromVariable(sourceVariable, sourceProperty) | Sets the variable's value from another variable, using either its value or text, depending on the property specified. |
Decrement() | Decrements the variable's value by 1, assuming the value is numeric. |
SetFromProfession(sourceProfession) | Sets the variable's value from a profession's ID. |
Events
Name | Description |
---|---|
OnBeforeExecution(sender, args) | Occurs before the execution of the workflow step. |
OnAfterExecution(sender, args) | Occurs after the execution of the workflow step. |
Generic Types
Name | Description |
---|---|
TProperties | Generic type of properties. |